import Vue from 'vue'
import VueRouter from 'vue-router'
import ResultsView from '../views/ResultsView.vue'
import PlayerView from "../views/PlayView.vue";
import MvView from "../views/MvView.vue";
import ComView from "../views/ComView.vue";

Vue.use(VueRouter)

const routes = [
  {
    path: '/results/:keyword',
    name: 'results',
    component: ResultsView
  },
  {
    path: '/play/:id',
    name: 'play',
    // which is lazy-loaded when the route is visited.
    component:PlayerView
  },
  {
    path: '/mv/',
    name: 'mv',
    // which is lazy-loaded when the route is visited.
    component: MvView
  },
  {
    path: '/com/',
    name: 'com',
    // which is lazy-loaded when the route is visited.
    component: ComView
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
